#ifndef YOLOV8_OPENVINO_INFERENCE_H
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <openvino/openvino.hpp> //openvino header file
#include <opencv2/opencv.hpp>    //opencv header file

using namespace cv;
using namespace dnn;

#define VIDEO_PATH "/home/xyw/project/yolov8_openvino/video/12mm_red_dark.mp4"
#define MODEL_PATH "/home/xyw/project/yolov8_openvino/model/04/best_int8_openvino_model/best.xml"

#define CONFIDENCE_THRESHOLD 0.75 //confidence threshold
#define NMS_THRESHOLD 0.3 // nms threshold


class yolo_Data {
public:
    std::vector<float> class_scores;
    std::vector<Rect> boxes;
    std::vector<std::vector<float>> objects_keypoints;
    int class_ids;
};


static std :: vector<cv::Scalar> colors = { Scalar(255, 0, 0), Scalar(255, 0, 255), Scalar(170, 0, 255), Scalar(255, 0, 85),
                                   Scalar (255, 0, 170)};
static std::vector<std::string> labels = {"RR ", "RW ", "BR ", "BW "};

Mat letterbox(const cv::Mat& source);
std :: vector<yolo_Data> Create_Data (std :: vector<yolo_Data> Data, Mat output_buffer, float score_threshold, float scale);
void drawBoundingBox(Mat& img, const Rect& box, int class_id, float score, const Scalar& color);
void draw_kpt(Mat& img, const std::vector<float>& keypoints, const std::vector<Scalar>& colors);

#define YOLOV8_OPENVINO_INFERENCE_H
#endif //YOLOV8_OPENVINO_INFERENCE_H
